package com.tekj.cxqcb.view.Module.activity;

import android.content.Intent;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.tekj.cxqcb.MainBActivity;
import com.tekj.cxqcb.R;
import com.tekj.cxqcb.config.Urls;

import butterknife.BindView;
import butterknife.OnClick;
import common.base.MainApplication;
import common.base.activity.BaseActivity;
import common.plugins.tbs.WebCoreAction;
import common.tool.Tools;
import es.dmoral.toasty.Toasty;

/**
 * 余额
 */
public class BalanceActivity extends BaseActivity {
    @BindView(R.id.img_back)
    ImageView imgBack;
    @BindView(R.id.tv_l)
    TextView tvL;
    @BindView(R.id.ll_back)
    LinearLayout llBack;
    @BindView(R.id.tv_title)
    TextView tvTitle;
    @BindView(R.id.iv_r)
    ImageView ivR;
    @BindView(R.id.tv_r)
    TextView tvR;
    @BindView(R.id.ll_right)
    LinearLayout llRight;
    @BindView(R.id.rl_title_bg)
    RelativeLayout rlTitleBg;
    @BindView(R.id.tv_balance)
    TextView tvBalance;
    @BindView(R.id.ll_cz)
    LinearLayout llCz;
    @BindView(R.id.ll_tx)
    LinearLayout llTx;
    @BindView(R.id.ll_yhk)
    LinearLayout llYhk;

    @Override
    public void init() {
        tvTitle.setText("余额");
        tvR.setText("明细");
        tvBalance.setText(MainBActivity.User.getBalance() + "");
    }

    @Override
    public int setLayout() {
        return R.layout.activity_balance;
    }

    @Override
    public void initLoadStart() {

    }

    @Override
    public void initLoadEnd() {

    }

    @Override
    public void initBindingView(Object mBean) {

    }


    @OnClick({R.id.ll_cz, R.id.ll_tx, R.id.ll_yhk, R.id.ll_back,R.id.ll_right})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.ll_back:
                finish();
                break;
            case R.id.ll_cz:
//                startActivity(new Intent(activity, PayMentActivity.class));
                Toasty.normal(activity,"暂无充值服务").show();
                break;
            case R.id.ll_tx:
                startActivity(new Intent(activity, WithdrawalActivity.class));

                break;
            case R.id.ll_yhk:
                startActivity(new Intent(activity, BankCardListActivity.class));
                break;
            case R.id.ll_right:
                new WebCoreAction(activity, Urls.Domain_H5+"/capital-details?userType=1&uid="
                        +MainBActivity.User.getUserId()+"&token="+ MainApplication.UserToken);
                break;
        }
    }
}
